Skip to content

Name the test that discharges every abstract test stating a response - #82

Merged
estebanzimanyi merged 1 commit into
masterfrom
test/ats-response-rows-name-their-tests
Nov 19, 2026
Merged

estebanzimanyi merged 1 commit into
masterfrom
test/ats-response-rows-name-their-tests

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

The distance, velocity and acceleration queries of Annex A
(/conf/movingfeatures/tpgeometry-query-*) are response rows of the suite,
discharged by the tests reading what the service answers, and every row
stating a response -- over the fixture database (atsLive) or a scripted
backend (atsResponse) -- names the test asserting it in atsDischargedBy.
TestATSEveryAnsweredRowIsDischarged, which TestATSEveryLiveRowIsDischarged
becomes, holds every such row to a test any test file declares.

Witness. Each of the three query tests states a response ("a Distance query
returns a TReal time-to-distance curve"), and the suite discharged them as
route rows, by the existence of GET /collections/{cid}/items/{fid}/tgsequence/
{tgid}/{qtype} alone: a route answering 404 for every query would have passed
them. The four response rows (collections-get-success,
collection-get-success, tgsequence-get-success, tproperties-get-success) were
counted as "response asserted" by TestATSCoverageReport with nothing naming
the test that asserts them. With the check widened to response rows and the
map unfilled, it fails on exactly those four.

Measured. go test -run TestATS: every test passes; 24 abstract tests state a
response (17 over the fixture, 7 over a scripted backend), 0 undischarged;
the coverage report reads 45 abstract tests, 25 served, 0 not served, 17
needing a backend. Route rows go from 21 to 18, response rows from 4 to 7;
no abstract test leaves the registry.

Why. An abstract test is discharged by what it states. A test stating a
response is met only by a test that reads that response, so the row names
it; whether the answer comes from the fixture or a scripted backend changes
where the test runs, not what a reader of the suite is owed. Acceleration's
row names the test pinning its 501 and its reason, the position the
implementation states on the wiki page of Part 1 until the standard scopes
the query (plan MobilityDB #3805, row A1).

The distance, velocity and acceleration queries of Annex A
(/conf/movingfeatures/tpgeometry-query-*) are response rows of the suite,
discharged by the tests reading what the service answers, and every row
stating a response -- over the fixture database (atsLive) or a scripted
backend (atsResponse) -- names the test asserting it in atsDischargedBy.
TestATSEveryAnsweredRowIsDischarged, which TestATSEveryLiveRowIsDischarged
becomes, holds every such row to a test any test file declares.

Witness. Each of the three query tests states a response ("a Distance query
returns a TReal time-to-distance curve"), and the suite discharged them as
route rows, by the existence of GET /collections/{cid}/items/{fid}/tgsequence/
{tgid}/{qtype} alone: a route answering 404 for every query would have passed
them. The four response rows (collections-get-success,
collection-get-success, tgsequence-get-success, tproperties-get-success) were
counted as "response asserted" by TestATSCoverageReport with nothing naming
the test that asserts them. With the check widened to response rows and the
map unfilled, it fails on exactly those four.

Measured. go test -run TestATS: every test passes; 24 abstract tests state a
response (17 over the fixture, 7 over a scripted backend), 0 undischarged;
the coverage report reads 45 abstract tests, 25 served, 0 not served, 17
needing a backend. Route rows go from 21 to 18, response rows from 4 to 7;
no abstract test leaves the registry.

Why. An abstract test is discharged by what it states. A test stating a
response is met only by a test that reads that response, so the row names
it; whether the answer comes from the fixture or a scripted backend changes
where the test runs, not what a reader of the suite is owed. Acceleration's
row names the test pinning its 501 and its reason, the position the
implementation states on the wiki page of Part 1 until the standard scopes
the query (plan MobilityDB #3805, row A1).
@estebanzimanyi
estebanzimanyi merged commit 1d6cbd0 into master Nov 19, 2026
2 checks passed
@estebanzimanyi
estebanzimanyi deleted the test/ats-response-rows-name-their-tests branch November 19, 2026 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant